<?php

namespace app\admin\controller;

use think\Controller;

class Login extends Controller
{
    public function __construct()
    {
        parent::__construct();
        $admin['css'] = ADMIN_CSS;
        $admin['js'] = ADMIN_JS;
        $admin['img'] = ADMIN_IMG;
        $admin['fonts'] = ADMIN_FONTS;
        $admin['vendor'] = ADMIN_VENDOR;
        $this->assign('admin', $admin);
        $this->session_admin = session('admin');
        if ($this->session_admin) {
            controller('index')->index();
            die;
        }
    }

    /*
     * 登录页面
     */
    public function login()
    {
//        $this->assign('vcode', Vcode());
        echo $this->fetch('public/login');
    }
}
